﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InnovTech.Persistence
{
    public interface IDatabaseAccess<TDatabaseInfo> : IDaoProvider
        where TDatabaseInfo : IDatabaseInfo
    {

        TDatabaseInfo CurrentDatabaseInfo { get; }

        ConnectionState ConnectionState { get; }
        ConnectionState Connect();
        void Disconnect();
        Exception ConnectionException { get; }
    }

    public enum ConnectionState
    {
        Closed,
        Open,
        Broken
    }
}
